<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
</head>

<body>
    <div id="app"></div>
    <script type="text/babel">

        var arr = ['吃饭', '睡觉', '打豆豆']


        var obj={
            name:'张三',
            age:12,
            gender:'男'
        }

        let itdom=<div>
            {Object.keys(obj).map((item,index)=>{
                return <p key={index}>{item}--------{obj[item]}</p>
            })}
            </div>

        
        // let mydom = arr.map((item, index) => {
        //     return (<p key={index}  onClick={()=>{console.log(index)}}>{item}</p>)
        // })

        ReactDOM.render(
            itdom,
            document.getElementById('app')
        );
    </script>
</body>

</html>